package com.kuizii.auth;

import org.springframework.util.StringUtils;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

public class JwtFilter implements Filter {
    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {

          if(servletRequest instanceof HttpServletRequest){
              String authorization = ((HttpServletRequest) servletRequest).getHeader("Authorization");

              if (StringUtils.isEmpty(authorization)) {
//                  throw new Exception(String.format("解析authorization出错 Authorization 为空 "));

              }
          }
    }
}
